//
//  DBJIllTypeModel.m
//  DBJ
//
//  Created by Captain_czq on 16/11/15.
//  Copyright © 2016年 itcast. All rights reserved.
//

#import "DBJIllTypeModel.h"
#import "DBJNetworkTool.h"
#import <YYModel.h>
@implementation DBJIllTypeModel

//responseObject = {
//    msg : OK,
//    data : [
//            {
//                ci3_id : 17,
//                ci3_name : 细胞淋巴瘤,
//                ci2_id : 17
//            },
//            {
//                ci3_id : 18,
/* 加载网络数据 */
+ (void)loadNewsDataWithURLStr:(NSString *)URLStr  numberId:(NSNumber *)numberid success:(void(^)(NSArray *newsList))successBlock failed:(void(^)(NSError *error))failedBlock{
    
         NSDictionary *parameters = @{@"page":@1,@"page_size":@15,@"ci1_id":numberid,@"keyword":@""};
    
   [[DBJNetworkTool sharedNetworkTool]POSTWithURLString:URLStr parameters:parameters success:^(id responseObject) {
       
       NSDictionary *result=[NSJSONSerialization JSONObjectWithData:responseObject options:0 error:NULL];
       NSLog(@"%@",result);
      
       NSArray *modelList=[NSArray yy_modelArrayWithClass:[DBJIllTypeModel class] json:result[@"data"]];
       NSLog(@"%ld",modelList.count);
       if(successBlock!=nil){
           
           successBlock(modelList);
       }
       
   } faile:^(NSError *error) {
       
       if(error!=nil){
           
           failedBlock(error);
       }
   }];
    
}


@end
